<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>网站设置</title>
	<link href="__ADMIN__/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="__ADMIN__/css/rightmain.css">
    <script language="JavaScript" src="__ADMIN__/js/jquery.js"></script>
</head>
<body>
       <div class="iframecontent">
            <div class="pos clearfix"><button class="btn btn-success">属性管理</button><span class="right"><button class="btn btn-info">属性添加</button></span></div>
            <div class="list">
                <div class="itab" id="itab">
                    <ul class="clearfix">
                    </ul>
                </div>
                <div class="itabcontent" id="itabcontent">
                    <!--站点配置开始-->
										<form method='post' action='' enctype="multipart/form-data">
                    <div class="itabcontentlist zdpz">
                        <dl class="clearfix">
                            <dt>属性名称：</dt>
                            <dd>
                                <input type="text" name="name" />
                            </dd>
                        </dl>
                        <dl class="clearfix">
                            <dt>商品分类：</dt>
                            <dd>
                              <select class="sel" name="cateid">
                                  <option value="0">--请选择--</option>
                                  <foreach name="cateinfo" item="v" key="k">
                                  <option value="{$v.cate_id}">{$v.cate_name}</option>
                                  </foreach>
                              </select>
                              <select class="sel level2" name="cateid" >
                                  <option value="0">--请选择--</option>
                              </select>
                              <select class="sel level3" name="cateid">
                                  <option value="0">--请选择--</option>
                              </select>
                            </dd>
                        </dl>
                        <dl class="clearfix">
                            <dt>属性类型：</dt>
                            <dd>
                                <input class="cho" type="radio" name="type" value="多选" checked="checked" >多选
                                <input class="cho" type="radio" name="type" value="单选" >单选
                                <input class="cho" type="radio" name="type" value="手填" >手填
                            </dd>
                        </dl>
												<dl class="clearfix">
														<dt>商品描述：</dt>
														<dd>
																<input type="text" name="introduce" />
														</dd>
												</dl>
                        <dl class="clearfix">
                            <dt class="surebtn">保存按钮：</dt>
                            <dd>
                                <a href="javascript:;" class="btn btn-info" />保存</a>
                            </dd>
                        </dl>
                    </div>
									</form>
                </div>
            </div>
        </div>
      <!-- Include all compiled plugins (below), or include individual files as needed -->
      <script src="__ADMIN__/bootstrap/js/bootstrap.min.js"></script>
      <script type="text/javascript">
      //alert($)
      $(function(){
      	 $("#itab ul li").click(function(){
                    var _id = $(this).index();
                    $(this).addClass('current-item').siblings().removeClass('current-item');
                    $('#itabcontent').children('.itabcontentlist').eq(_id).fadeIn('fast').siblings('.itabcontentlist').css('display','none');
                });
				$('.btn-info').click(function(){
					$('form').submit();
				});
        $('.sel').bind('change',function(){
          var str = "<option value='0'>--请选择--</option>";
          var _this = $(this);
          var pid = $(this).val();
          _this.find("+").empty();
          _this.find("+").html(str);
          _this.find("+").find("+").empty();
          _this.find("+").find("+").html(str);
          //alert(pid);
          var data = {
            pid : pid
          };
          $.post("{:U('cate/categet')}",data,function(msg){
            //alert(msg);
            _this.find("+").empty();
            _this.find("+").html(msg);
          });
        });
				$('.cho').change(function(){
					if($(this).val()=="手填"){
						//alert(1);
						$(this).parent().parent().find('+').find(':input').val("");
						$(this).parent().parent().find('+').hide();
					}else{
						$(this).parent().parent().find('+').show();
					}
				})
      })
      </script>
  </body>
</html>
